<%-- 
    Document   : aa
    Created on : Dec 8, 2013, 12:38:52 PM
    Author     : Prasetyawan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <body> 
<h2>Data Barang</h2>

<sql:query var="BARANG" dataSource="jdbc:oracle:thin:@localhost:1521:XE">
SELECT kodebarang, namabarang, jenisbarang, jumlahbarang FROM BARANG;
</sql:query>

<table border="1">
<thead><tr><td>KodeBarang</td><td>NamaBarang</td><td>JenisBarang</td><td>JumlahBarang</td></tr></thead>
<tbody>
<c:forEach var="BARANG" items="${BARANG.rows}">
<tr>
<td>${BARANG.KodeBarang}</td>
<td>${BARANG.NamaBarang}</td>
<td>${BARANG.JenisBarang}</td>
<td>${BARANG.JumlahBarang}</td>
</tr>
</c:forEach>
</tbody>
</table>
</body>
</html>